Part Number Hot Search : 
0542MN 2SC47 ELECT T09N2 51257 DB154S SI9114 UNR9110J
Product Description
Full Text Search
 

To Download MCP9804 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ? 2009 microchip technology inc. ds22203a-page 1 MCP9804 features ? accuracy: - 0.25c (typical) from -40c to +125c - 1c (maximum) from -40c to +125c ? user selectable measurement resolution: - 0.5c, 0.25c, 0.125c, 0.0625c ? user programmable temperature limits: - temperature window limit - critical temperature limit ? user programmable temperature alert output ? operating voltage range: 2.7v to 5.5v ? operating current: 200 a (typical) ? shutdown current: 0.1 a (typical) ? 2-wire interface: i 2 c/smbus compatible ? available packages: 2x3 dfn-8, msop-8 typical applications ? general purpose ? industrial applications ? industrial freezers and refrigerations ? food processing ? personal computers and servers ? pc peripherals ? consumer electronics ? hand-held/portable devices temperature accuracy description microchip technology inc.?s MCP9804 digital temperature sensor conver ts temperatures between -40c and +125c to a digital word with 0.25c/1c (typical/maximum) accuracy. the MCP9804 comes with user-programmable registers that provide flexibility temperature sensing applications. the registers allow user-selectable settings such as shutdown or low-power modes and the specification of temperature alert window limits and critical output limits. wh en the temperature changes beyond the specified boundar y limits, the MCP9804 outputs an alert signal. the user has the option of setting the alert output signal polarity as an active-low or active-high comparator output for thermostat operation, or as temperatur e alert interrupt output for microprocessor-based systems. the alert output can also be configured as a critical temperature output only. this sensor has an industry standard 100 khz 2-wire, smbus/i 2 c compatible serial interface, allowing up to eight or sixteen sensors to be controlled with a single serial bus (see ta b l e 3 - 2 for available address codes). these features make the MCP9804 ideal for sophisticated multi-zone temperature-monitoring applications. package types 0% 10% 20% 30% 40% -1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0 temperature accuracy (c) occurrences t a = -40c to 125c v dd = 3.3v 2787 units 8-pin 2x3 dfn * 1 2 3 4 8-pin msop 8 7 6 5 * includes exposed thermal pad (ep); see table 3-1 . a1 a0 a2 scl alert 1 2 3 4 8 7 6 5 gnd sda v dd ep 9 scl alert gnd sda a1 a0 a2 v dd 0.25c typ. accuracy digital temperature sensor
MCP9804 ds22203a-page 2 ? 2009 microchip technology inc. notes:
? 2009 microchip technology inc. ds22203a-page 3 MCP9804 1.0 electrical characteristics absolute maximum ratings ? v dd .................................................................................. 6.0v voltage at all input/output pins .............. gnd ? 0.3v to 6.0v storage temperature ....................................-65c to +150c ambient temperature with power applied ....-40c to +125c junction temperature (t j ) .......................................... +150c esd protection on all pins (hbm:mm) ................ (4 kv:400v) latch-up current at each pin (25c)....................... 200 ma ?notice: stresses above those listed under ?maximum ratings? may cause permanent dam age to the device. this is a stress rating only and functional operation of the device at those or any other conditions above those indicated in the operational listings of this specification is not implied. exposure to maximum rating conditions for extended periods may affect device reliability. temperature sensor dc characteristics electrical specifications: unless otherwise indicated, v dd = 2.7v to 5.5v, gnd = ground, and t a = -40c to +125c. parameters sym min typ max unit conditions temperature sensor accuracy +40c < t a +125c t acy -1.0 0.25 +1.0 c v dd = 3.3v temperature conversion time 0.5c/bit t conv ? 30 ms 33s/sec (typical) 0.25c/bit ? 65 ms 15s/sec (typical) 0.25c/bit ? 130 ms 7s/sec (typical) 0.25c/bit ? 250 ms 4s/sec (typical) power supply operating voltage range v dd 2.7 ? 5.5 v operating current i dd ? 200 400 a shutdown current i shdn ?0.1 2 a power on reset (por) v por ? 2.2 ? v threshold for falling v dd power supply rejection, t a = +25c c/ v dd ?-0.1 ? c/vv dd = 2.7v to 5.5v ? 0.15 ? c v dd = 3.3v+150 mv pp ac (0 to 1 mhz) alert output (open-drain output, external pull -up resistor required), see section 5.2.3 high-level current (leakage) i oh ?? 1 av oh = v dd (active-low, pull-up resistor) low-level voltage v ol ?? 0.4 vi ol = 3 ma (active-low, pull-up resistor) thermal response, from +25c (air) to +125c (oil bath) dfn-8 t res ? 0.7 ? s time to 63% (89c) msop-8 ? 1.4 ? s
MCP9804 ds22203a-page 4 ? 2009 microchip technology inc. graphical symbol description digital input/output pin characteristics electrical specifications: unless otherwise indicated, v dd = 2.7v to 5.5v, gnd = ground, and t a = -40c to +125c. parameters sym min typ max units conditions serial input/output (scl, sda, a0, a1, a2) input high-level voltage v ih 2.1 ? ? v low-level voltage v il ??0.8v input current i in ??5a output (sda) low-level voltage v ol ??0.4vi ol = 3 ma high-level current (leakage) i oh ??1av oh = 5.5v low-level current i ol 6??mav ol = 0.6v sda and scl inputs hysteresis v hyst ?0.5?v spike suppression t sp ? ? 50 ns capacitance c in ?5?pf v dd v ih v il i in voltage current time v dd i oh voltage current time input output v ol i ol temperature characteristics electrical specifications: unless otherwise indicated, v dd = 2.7v to 5.5v and gnd = ground. parameters sym min typ max units conditions temperature ranges specified temperature range t a -40 ? +125 c note 1 operating temperature range t a -40 ? +125 c storage temperature range t a -65 ? +150 c thermal package resistances thermal resistance, 8l-dfn ja ?41?c/w thermal resistance, 8l-msop ja ?206? c/w note 1: operation in this range must not cause t j to exceed maximum junction temperature (+150c).
? 2009 microchip technology inc. ds22203a-page 5 MCP9804 timing diagram sensor serial interface timing specifications electrical specifications: unless otherwise indicated, v dd = 2.7v to 5.5v, t a = -40c to +125c, gnd = ground, and c l = 80 pf ( note ). parameters sym min max units conditions 2-wire smbus/standard mode i 2 c? compatible interface (note) serial port clock frequency f sc 10 ? 100 khz low clock t low 4.7 ? ? s high clock t high 4.0 ? ? s rise time t r ? ? 1000 ns fall time t f ??300 ns data setup before scl high t su-data 250 ? ? ns data hold after scl low t hd-data 300 ? ? ns start condition setup time t su-start 4.7 ? ? s start condition hold time t hd-start 4.0 ? ? s stop condition setup time t su-stop 4.0 ? ? s bus free t b-free 4.7 ? ? s time out t out 20 27 35 ms note: the serial interface specification min./max. limits are specified by characterizati on (not production tested). t su-start t h-start t su-data t su-stop t b-free scl sda t h-data t high t low t out t r , t f start condition data transmission stop condition
MCP9804 ds22203a-page 6 ? 2009 microchip technology inc. notes:
? 2009 microchip technology inc. ds22203a-page 7 MCP9804 2.0 typical performance curves note: unless otherwise indicated, v dd = 2.7v to 5.5v, gnd = ground, sda/scl pulled-up to v dd , and t a = -40c to +125c. figure 2-1: temperature accuracy. figure 2-2: temperature accuracy histogram, t a = -40c to +125c. figure 2-3: temperature accuracy histogram, t a = +25c. figure 2-4: temperature accuracy histogram, t a = +45c. figure 2-5: temperature accuracy histogram, t a = +125c. figure 2-6: temperature accuracy histogram, t a = -40c. note: the graphs and tables provided following this note are a statistical summary based on a limited number of samples and are provided for informational purpose s only. the performance characteristics listed herein are not tested or guaranteed. in so me graphs or tables, the data presented may be outside the specified operating range (e.g., outside specified power suppl y range) and therefore outs ide the warranted range. -1.0 -0.5 0.0 0.5 1.0 -40 -20 0 20 40 60 80 100 120 t a (c) temperature accuracy (c) v dd = 3.3v 722 units at -40c, +45c, +125c 64 units at other temperatures +std. dev. average -std. dev. 0% 10% 20% 30% 40% -1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0 temperature accuracy (c) occurrences t a = -40c to +125c v dd = 3.3v 2787 units 0% 10% 20% 30% 40% 50% 60% -1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0 temperature accuracy (c) occurrences t a = +25c v dd = 3.3v 64 units 0% 10% 20% 30% 40% 50% 60% -1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0 temperature accuracy (c) occurrences t a = +45c v dd = 3.3v 722 units 0% 10% 20% 30% 40% 50% 60% -1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0 temperature accuracy (c) occurrences t a = +125c v dd = 3.3v 722 units 0% 10% 20% 30% 40% 50% 60% -1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0 temperature accuracy (c) occurrences t a = -40c v dd = 3.3v 722 units
MCP9804 ds22203a-page 8 ? 2009 microchip technology inc. note: unless otherwise indicated, v dd = 2.7v to 5.5v, gnd = ground, sda/scl pulled-up to v dd , and t a = -40c to +125c. figure 2-7: supply current vs. temperature. figure 2-8: shutdown current vs. temperature. figure 2-9: power-on reset threshold voltage vs. temperature. figure 2-10: temperature accuracy vs. supply voltage. figure 2-11: power supply rejection vs. frequency. figure 2-12: temperature conversion time vs. temperature. 100 150 200 250 300 350 400 -40 -20 0 20 40 60 80 100 120 temperature (c) i dd (a) 0.00 0.50 1.00 1.50 2.00 -40 -20 0 20 40 60 80 100 120 temperature (c ) i shdn (a) 1 1.5 2 2.5 3 -40 -20 0 20 40 60 80 100 120 temperature (c) v por (v) -1.00 -0.50 0.00 0.50 1.00 -40-200 20406080100120 temperature (c) temperature accuracy (c) c/ v dd = 0.1c/v v dd = 2.7v v dd = 3.3v v dd = 5.5v -1.0 -0.5 0.0 0.5 1.0 100 1,000 10,000 100,000 1,000,000 frequency (hz) normalized temp. error (c) c/ v dd , v dd = 3.3v + 150 mv pp (ac) t a = 25c 1k 10k 100k 1m 100k 1m 10k 100k 1m 1k 10k 100k 1m 100 1k 10k 100k 1m t a = +25c no decoupling capacitor 10 100 1000 -40 -20 0 20 40 60 80 100 120 temperature (c) t conv (ms) 0.0625c 0.125c 0.25c 0.5c
? 2009 microchip technology inc. ds22203a-page 9 MCP9804 note: unless otherwise indicated, v dd = 2.7v to 5.5v, gnd = ground, sda/scl pulled-up to v dd , and t a = -40c to +125c. figure 2-13: sda & alert output v ol vs. temperature. figure 2-14: sda i ol vs. temperature. figure 2-15: package thermal response. figure 2-16: smbus timeout vs. temperature. 0 0.1 0.2 0.3 0.4 -40 -20 0 20 40 60 80 100 120 temperature (c) sda & alert output v ol (v) alert v ol sda v ol i ol = 3 ma 6 12 18 24 30 36 42 48 -40 -20 0 20 40 60 80 100 120 temperature (c) sda i ol (ma) v ol = 0.6v 0% 20% 40% 60% 80% 100% 120% -2 0 2 4 6 8 10 12 14 16 time (s) thermal response (%) room to +125c (oil bath) msop-8 dfn-8 20 25 30 35 -40 -20 0 20 40 60 80 100 120 temperature (c) smbus/i 2 c bus t out (ms)
MCP9804 ds22203a-page 10 ? 2009 microchip technology inc. notes:
? 2009 microchip technology inc. ds22203a-page 11 MCP9804 3.0 pin description the descriptions of the pins are listed in table 3-1 . 3.1 address pins (a0, a1, a2) these pins are device address input pins. the address pins correspond to the least significant bits (lsb) of address bits. the most significant bits (msb) (a6, a5, a4, a3). this is shown in ta b l e 3 - 2 . 3.2 ground pin (gnd) the gnd pin is the system ground pin. 3.3 serial data line (sda) sda is a bidirectional input/ output pin, used to serially transmit data to/from the host controller. this pin requires a pull-up resistor. (see section 4.0 ). 3.4 serial clock line (scl) the scl is a clock input pin. all communication and timing is relative to the signal on this pin. the clock is generated by the ho st or master controller on the bus. (see section 4.0 ). 3.5 temperature alert, open-drain output (alert) the MCP9804 temperature alert output pin is an open-drain output. the device outputs a signal when the ambient temperature goes beyond the user-programmed temperature limit. (see section 5.2.3 ). 3.6 power pin (v dd ) v dd is the power pin. the operating voltage range, as specified in the dc electric al specification table, is applied on this pin. 3.7 exposed thermal pad (ep) there is an internal electrical connection between the exposed thermal pad (ep) and the gnd pin. the ep may be connected to the sy stem ground on the printed circuit board (pcb). table 3-1: pin function table dfn msop symbol pin function 1 1 sda serial data line 2 2 scl serial clock line 3 3 alert temperature alert output 4 4 gnd ground 5 5 a2 slave address 6 6 a1 slave address 7 7 a0 slave address 88 v dd power pin 9 ? ep exposed thermal pad (ep); must be connected to gnd. table 3-2: MCP9804 address byte device address code slave address a6 a5 a4 a3 a2 a1 a0 MCP9804 0 0 1 1 x (1) xx MCP9804 (2) 1001xxx note 1: user-selectable address is shown by x. a2, a1 and a0 must match the corresponding device pin configuration. 2: contact factory for this address code.
MCP9804 ds22203a-page 12 ? 2009 microchip technology inc. notes:
? 2009 microchip technology inc. ds22203a-page 13 MCP9804 4.0 serial communication 4.1 2-wire standard mode i 2 c? protocol-compatible interface the MCP9804 serial clock input (scl) and the bidirectional serial data line (sda) form a 2-wire bidirectional standard mode i 2 c compatible communication port (refer to the digital input/output pin characteristics table and sensor serial interface timing specifications table). the following bus protocol has been defined: 4.1.1 data transfer data transfers are initiated by a start condition (start), followed by a 7-bit device address and a read/write bit. an acknowledge (ack) from the slave confirms the reception of each byte. each access must be terminated by a stop condition (stop). repeated communication is initiated after t b-free . this device does not suppor t sequential register read/ write. each register needs to be addressed using the register pointer. this device supports the receive protocol. the register can be specified using the pointer for the initial read. each repeated read or receive begins with a start condition and address byte. the MCP9804 retains the previously selected register . therefore, it outputs data from the previously-specified register (repeated pointer specification is not necessary). 4.1.2 master/slave the bus is controlled by a master device (typically a microcontroller) that controls the bus access and generates the start and stop conditions. the MCP9804 is a slave device and does not control other devices in the bus. both master and slave devices can operate as either transmitter or receiver. however, the master device determines which mode is activated. 4.1.3 start/stop condition a high-to-low transition of the sda line (while scl is high) is the start condition. all data transfers must be preceded by a start condition from the master. a low-to-high transition of the sda line (while scl is high) signifies a stop condition. if a start or stop condition is introduced during data transmission, the MCP9804 releases the bus. all data transfers are ended by a stop condition from the master. 4.1.4 address byte following the start condition, the host must transmit an 8-bit address byte to the MCP9804. the address for the MCP9804 temper ature sensor is ? 0011,a2,a1,a0 ? in binary, where the a2, a1 and a0 bits are set externally by connecting the corresponding pins to v dd ? 1 ? or gnd ? 0 ?. the 7-bit address transmitted in the serial bit stream must match the selected address for the MCP9804 to respond with an ack. bit 8 in the address byte is a read/write bit. setting this bit to ? 1 ? commands a read operation, while ? 0 ? commands a write operation (see figure 4-1 ). figure 4-1: device addressing. table 4-1: MCP9804 serial bus protocol descriptions term description master the device that co ntrols the serial bus, typically a microcontroller. slave the device addressed by the master, such as the MCP9804. transmitter device sending data to the bus. receiver device receiving data from the bus. start a unique signal from master to initiate serial interface with a slave. stop a unique signal from the master to terminate serial interface from a slave. read/write a read or write to the MCP9804 registers. ack a receiver acknowledges (ack) the reception of each byte by polling the bus. nak a receiver not-acknowledges (nak) or releases the bus to show end-of-data (eod). busy communication is not possible because the bus is in use. not busy the bus is in the idle state, both sda and scl remain high. data valid sda must remain stable before scl becomes high in order for a data bit to be considered valid. during normal data transfers, sda only changes state while scl is low. 123456789 scl sda 0 1 1 a2a1a0 start address byte slave address r/w MCP9804 response code address a c k 0 see table 3-2: ?MCP9804 address byte?
MCP9804 ds22203a-page 14 ? 2009 microchip technology inc. 4.1.5 data valid after the start condition, each bit of data in transmission needs to be settled for a time specified by t su-data before scl toggles from low-to-high (see the sensor serial interface timing specifications section). 4.1.6 acknowledge (ack/nak) each receiving device, when addressed, is obliged to generate an ack bit after the reception of each byte. the master device must generate an extra clock pulse for ack to be recognized. the acknowledging device pulls down the sda line for t su-data before the low-to-high transition of scl from the master. sda also needs to remain pulled down for t h-data after a high-to-low transition of scl. during read, the master must signal an end-of-data (eod) to the slave by not generating an ack bit (nak) once the last bit has been clocked out of the slave. in this case, the slave will leave the data line released to enable the master to generate the stop condition. 4.1.7 time out if the scl stays low or high for the time specified by t out , the MCP9804 temperature sensor resets the serial interface. this dictates the minimum clock speed as specified in th e specification.
? 2009 microchip technology inc. ds22203a-page 15 MCP9804 5.0 functional description the MCP9804 temperature sensors consists of a band-gap type temperature sensor, a delta-sigma analog-to-digital converter ( ? adc), user- programmable registers and a 2-wire smbus/i 2 c protocol compatible serial interface. figure 5-1 shows a block diagram of the register structure. figure 5-1: functional block diagram. clear alert 0.5c 0.25c 0.125c 0.0625c temperature t upper t lower configuration ? adc band-gap temperature sensor alert status output control critical alert only alert polarity alert comp/int t crit register pointer critical trip lock alarm win. lock bit shutdown hysteresis manufacturer id resolution device id/rev smbus/standard i 2 c interface a0 a1 a2 alert sda scl v dd gnd
MCP9804 ds22203a-page 16 ? 2009 microchip technology inc. 5.1 registers the MCP9804 has several registers that are user-accessible. these registers include the temperature register, configuration register, temperature alert upper-boundary and lower-boundary limit registers, critical temperature limit register, manufacturer identification register and device identification register. the temperature register is read-only, used to access the ambient temperature data. this register is double buffered and it is updated every t conv . the temperature alert upper-boundary and lower-boundary limit r egisters are read/writes registers. if the ambient te mperature drifts beyond the user-specified limits, the MCP9804 outputs a signal using the alert pin (refer to section 5.2.3 ). in addition, the critical temperature limit register is used to provide an additional critical temperature limit. the configuration register provides access to configure the MCP9804?s various features. these registers are described in further detail in the following sections. the registers are accessed by sending a register pointer to the MCP9804 using the serial interface. this is an 8-bit write-only pointe r. however, the four least significant bits are used as pointers and all unused bits (bits 7-3) need to be cleared or set to ? 0 ?. register 5-1 describes the pointer or the address of each register. register 5-1: register pointer (write only) w-0 w-0 w-0 w-0 w-0 w-0 w-0 w-0 ???? pointer bits bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 7-4 writable bits: write ? 0 ? bits 7-4 must always be cleared or written to ? 0 ?. this device has additional registers that are reserved for test and calibration. if these registers are accessed, the device may not perform according to the specification. bit 3-0 pointer bits: 0000 = rfu, reserved for future use (read only register) 0001 = configuration register (config) 0010 = alert temperature uppe r-boundary trip register (t upper ) 0011 = alert temperature lowe r-boundary trip register (t lower ) 0100 = critical temperature trip register (t crit ) 0101 = temperature register (t a ) 0110 = manufacturer id register 0111 = device id/revision register 1000 = resolution register 1xxx =rfu ( note ) note: some registers contain calibration codes and shoul d not be accessed. accessing these registers could cause permanent sensor decalibration.
? 2009 microchip technology inc. ds22203a-page 17 MCP9804 table 5-1: bit assignment summary fo r all registers (see section 5.3 for power-on defaults) register pointer (hex) msb/ lsb bit assignment 76 5 43210 0x00 msb 0 0 0 0 0 0 0 0 lsb 0 0 0 1 1 1 1 1 0x01 msb 0 0 0 0 0 hysteresis shdn lsb crt loc win loc int clr alt stat alt cnt alt sel alt pol alt mod 0x02 msb 0 0 0 sign 2 7 c 2 6 c 2 5 c 2 4 c lsb 2 3 c 2 2 c 2 1 c 2 0 c 2 -1 c 2 -2 c 0 0 0x03 msb 0 0 0 sign 2 7 c 2 6 c 2 5 c 2 4 c lsb 2 3 c 2 2 c 2 1 c 2 0 c 2 -1 c 2 -2 c 0 0 0x04 msb 0 0 0 sign 2 7 c 2 6 c 2 5 c 2 4 c lsb 2 3 c 2 2 c 2 1 c 2 0 c 2 -1 c 2 -2 c 0 0 0x05 msb t a t crit t a > t upper t a < t lower sign 2 7 c 2 6 c 2 5 c 2 4 c lsb 2 3 c 2 2 c 2 1 c 2 0 c 2 -1 c 2 -2 c 0 0 0x06 msb 0 0 0 0 0 0 0 0 lsb 0 1 0 1 0 1 0 0 0x07 msb 0 0 0 0 0 0 1 0 lsb 0 0 0 0 0 0 0 0 0x08 lsb 0 0 0 0 0 0 1 1
MCP9804 ds22203a-page 18 ? 2009 microchip technology inc. 5.1.1 sensor configuration register (config) the MCP9804 has a 16-bit configuration register (config) that allows the us er to set various functions for a robust temperature monitoring system. bits 10 thru 0 are used to select temperature alert output hysteresis, device shutdown or low-power mode, temperature boundary and cr itical temperature lock, and temperature alert out put enable/disable. in addition, alert output condition (output set for t upper and t lower temperature boundary or t crit only), alert output status and aler t output polarity and mode (comparator output or inte rrupt output mode) are user configurable. the temperature hysteresis bits 10 and 9 can be used to prevent output chatter when the ambient temperature gradually changes beyond the user-specified temperature boundary (see section 5.2.2 . the continuous conversion or shutdown mode is selected using bit 8. in shutdown mode, the band gap temperat ure sensor circuit stops converting temperature and the ambient temperature register (t a ) holds the previous temperature data (see section 5.2.1 ). bits 7 and 6 are used to lock the user- specified boundaries t upper , t lower and t crit to prevent an accidental rewrite. the lock bits are cleared by reseting power. bits 5 thru 0 are used to configure the temperature alert output pin. all functions are described in register 5-2 (see section 5.2.3 ). register 5-2: configuration register (config) address ?0000 0001?b u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 ????? t hyst shdn bit 15 bit 8 r/w-0 r/w-0 r/w-0 r-0 r/w-0 r/w-0 r/w-0 r/w-0 crit. lock win. lock int. clear alert stat. alert cnt. alert sel. alert pol. alert mod. bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-11 unimplemented: read as ? 0 ? bit 10-9 t upper and t lower limit hysteresis (t hyst ): 00 = 0c (power-up default) 01 = 1.5c 10 = 3.0c 11 = 6.0c (refer to section 5.2.3 ) this bit can not be altered when either of the lock bits are set (bit 6 and bit 7). this bit can be programmed in shutdown mode. bit 8 shutdown mode (shdn): 0 = continuous conversion (power-up default) 1 = shutdown (low-power mode) in shutdown, all power-consuming activities are disabled, though all registers can be written to or read. this bit cannot be set ? 1 ? when either of the lock bits is set (bit 6 and bit 7). however, it can be cleared ? 0 ? for continuous conversion while locked. (refer to section 5.2.1 ).
? 2009 microchip technology inc. ds22203a-page 19 MCP9804 bit 7 t crit lock bit (crit. lock): 0 = unlocked. t crit register can be wri tten (power-up default). 1 = locked. t crit register can not be written. when enabled, this bit remains set ? 1 ? or locked until cleared by internal reset ( section 5.3 ). this bit does not require a double-write. this bit can be programmed in shutdown mode. bit 6 t upper and t lower window lock bit (win. lock): 0 = unlocked. t upper and t lower registers can be writ ten (power-up default). 1 = locked. t upper and t lower registers can not be written. when enabled, this bit remains set ? 1 ? or locked until cleared by power-on reset ( section 5.3 ). this bit does not require a double-write. this bit can be programmed in shutdown mode. bit 5 interrupt clear (int. clear) bit: 0 = no effect (power-up default) 1 = clear interrupt output. when read this bit returns ? 0 ? this bit can not be set ?1? in shutdown mode, but it can be cleared after the device enters shutdown mode. bit 4 alert output status (alert stat.) bit: 0 = alert output is not asserted by the device (power-up default) 1 = alert output is asserted as a comparat or/interrupt or critic al temperature output this bit can not be set ?1? or cleared ?0? in shut down mode. however, if the alert output is configured as interrupt mode, and if the host controller clears ?0? the interrupt using bit 5 while the device is in shutdown mode then this bit will also be cleared ?0?. bit 3 alert output contro l (alert cnt.) bit: 0 = disabled (power-up default) 1 = enabled this bit can not be altered when either of the lock bits is set (bit 6 and bit 7). this bit can be programmed in shutdown mode, bu t the alert output will not assert or de-assert. bit 2 alert output select (alert sel.) bit: 0 = alert output for t upper , t lower and t crit (power-up default) 1 = t a > t crit only. (t upper and t lower temperature boundaries are disabled.) when the alarm window lock bit is set, this bit cannot be altered until unlocked (bit 6). this bit can be programmed in shutdown mode, bu t the alert output will not assert or de-assert. bit 1 alert output polarity (alert pol.) bit: 0 = active low (power-up default. pull-up resistor required) 1 = active-high this bit cannot be altered when either of the lock bits is set (bit 6 and bit 7). this bit can be programmed in shutdown mode, bu t the alert output will not assert or de-assert. bit 0 alert output mode (alert mod.) bit: 0 = comparator output (power-up default) 1 = interrupt output this bit cannot be altered when either of the lock bits is set (bit 6 and bit 7). this bit can be programmed in shutdown mode, bu t the alert output will not assert or de-assert. register 5-2: configuration register (config) address ?0000 0001?b
MCP9804 ds22203a-page 20 ? 2009 microchip technology inc. figure 5-2: timing diagram for writing to the configuration register (see section 4.0 . ? writing to the config register to enable the event output pin <0000 0000 0000 1000>b. sda a c k 0011 a 0000 a c k s 2 a 1 a 0 12345678 12345678 scl 0 address byte w MCP9804 MCP9804 msb data a c k a c k p 12345678 12345678 lsb data configuration pointer MCP9804 MCP9804 001 00000 000 00001 000 note: this is an example routine: (see appendix a: ?source code? ) i2c_start(); // send start command i2c_write(addressbyte & 0x fe); //write command (see section 4.1.4 ) //also, make sure bit 0 is cleared ?0? i2c_write(0x01); // write config register i2c_write(0x00); // write data i2c_write(0x08); // write data i2c_stop(); // send stop command
? 2009 microchip technology inc. ds22203a-page 21 MCP9804 figure 5-3: timing diagram for reading from the configuration register (see section 4.0 ). sda a c k 0011 a configuration pointer 0000 a c k s 2 a 1 a 0 12345678 12345678 scl 0 address byte a c k 0011 a msb data a c k n a k s p 2 a 1 a 0 12345678 12345678 12345678 address byte lsb data r MCP9804 MCP9804 MCP9804 master master w sda scl 001 00000 000 00001 000 ? reading the config register. note: it is not necessary to select the register pointer if it was set from the previous read/write. note: this is an example routine: (see appendix a: ?source code? ) i2c_start(); // send start command i2c_write(addressbyte & 0xfe); //write command (see section 4.1.4 ) //also, make sure bit 0 is cleared ?0? i2c_write(0x01); // write config register i2c_start(); // send repeat start command i2c_write(addressbyte | 0x01); //read command //also, make sure bit 0 is set ?1? upperbyte = i2c_read(a ck); // read 8 bits //and send ack bit lowerbyte = i2c_read (nak); // read 8 bits //and send nak bit i2c_stop(); // send stop command
MCP9804 ds22203a-page 22 ? 2009 microchip technology inc. 5.1.2 upper/lower/critical temperature limit registers (t upper /t lower /t crit ) the MCP9804 has a 16-bit read/write alert output temperature upper-boundary register (t upper ), a 16- bit lower-boundary register (t lower ) and a 16-bit critical boundary register (t crit ) that contains 11-bit data in two?s complement format (0.25c). this data represents the maximum and minimum temperature boundary or temperature window that can be used to monitor ambient temperature. if this feature is enabled ( section 5.1.1 ) and the ambient temperature exceeds the specified boundary or window, the MCP9804 asserts an alert output. (refer to section 5.2.3 ). register 5-3: upper/lower/critica l temperature limit register (t upper /t lower / t crit ) address ?0000 0010?b/?0000 0011?b/?0000 0100?b (note) u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ???sign2 7 c 2 6 c 2 5 c 2 4 c bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 u-0 2 3 c 2 2 c 2 1 c 2 0 c 2 -1 c 2 -2 c ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as ? 0 ? bit 12 sign: 0 =t a 0c 1 =t a < 0c bit 11-2 t upper /t lower /t crit : temperature boundary trip data in two?s complement format. bit 1-0 unimplemented: read as ? 0 ? note: this table shows two 16-bit registers for t upper , t lower and t crit located at ? 0000 0010b ?, ? 0000 0011b ? and ? 0000 0100b ?, respectively.
? 2009 microchip technology inc. ds22203a-page 23 MCP9804 figure 5-4: timing diagram for writing and reading from the t upper register (see section 4.0 ). sda a c k 0011 a t upper pointer 0000 a c k s 2 a 1 a 0 12345678 12345678 scl 0 address byte a c k 0011 a msb data a c k n a k s p 2 a 1 a 0 12345678 12345678 12345678 address byte lsb data r MCP9804 MCP9804 MCP9804 master master w sda scl 010 00000 101 10100 000 ? reading from the t upper register. ? writing 90c to the t upper register <0000 0101 1010 0000>b. sda a c k 0011 a 0000 a c k s 2 a 1 a 0 12345678 12345678 scl 0 address byte w MCP9804 MCP9804 msb data a c k a c k p 12345678 12345678 lsb data t upper pointer MCP9804 MCP9804 010 00000 101 10100 000 note: it is not necessary to select the register pointer if it was set from the previous read/write.
MCP9804 ds22203a-page 24 ? 2009 microchip technology inc. 5.1.3 ambient temperature register (t a ) the MCP9804 uses a band gap temperature sensor circuit to output analog voltage proportional to absolute temperature. an internal ? adc is used to convert the analog voltage to a digital word. the digital word is loaded to a 16-bit read-only ambient temperature register (t a ) that contains 13-bi t temperature data in two?s complement format. the t a register bits (bits 12 thru 0) are double-buffered. therefore, the user can access the register while, in the background, the MCP9804 performs an analog-to- digital conversion. the temperature data from the ? adc is loaded in parallel to the t a register at t conv refresh rate. in addition, the t a register uses three bits (bits 15, 14 and 13) to reflect the alert pin state. this allows the user to identify the cause of the alert output trigger (see section 5.2.3 ); bit 15 is set to ? 1 ? if t a is greater than or equal to t crit , bit 14 is set to ? 1 ? if t a is greater than t upper and bit 13 is set to ? 1 ? if t a is less than t lower . the t a register bit assignment and boundary conditions are described in register 5-4 . register 5-4: ambient temperature register (t a ) address ?0000 0101?b (note 1) r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 t a vs. t crit t a vs. t upper t a vs. t lower sign 2 7 c 2 6 c 2 5 c 2 4 c bit 15 bit 8 r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 2 3 c 2 2 c 2 1 c 2 0 c 2 -1 c 2 -2 c 2 -3 c 2 -4 c bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15 t a vs. t crit (note 1) bit: 0 =t a < t crit 1 =t a t crit bit 14 t a vs. t upper (note 1) bit: 0 =t a t upper 1 =t a > t upper bit 13 t a vs. t lower (note 1) bit: 0 =t a t lower 1 =t a < t lower bit 12 sign bit: 0 =t a 0c 1 =t a < 0c bit 11-0 ambient temperature (t a ) bits: (note 2) 12-bit ambient temperature data in two?s complement format. note 1: bits 15, 14 and 13 are not affected by the status of t he alert output configuration (bits 5 to 0 of config) ( register 5-2 ). 2: bits 2, 1, and 0 may remain clear '0' depending on the status of the resolution register ( register 5-7 ). the power-up default is 0.25c/bit, bits 1 and 0 remain clear '0' .
? 2009 microchip technology inc. ds22203a-page 25 MCP9804 5.1.3.1 t a bits to temperature conversion to convert the t a bits to decimal temperature, the upper three boundary bits (bits 15, 14 and 13) must be masked out. then determine the sign bit (bit 12) to check positive or negative temperature, shift the bits accordingly and combine the upper and lower bytes of the 16-bit register. the upper byte contains data for temperatures greater than 32c while the lower byte contains data for temperature less than 32c, including fractional data. when combining the upper and lower bytes, the upper byte must be right-shifted by 4 bits (or multiply by 2 4 ) and the lower byte must be left-shifted by 4 bits (or multiply by 2 -4 ). adding the results of the shifted values provides the temperature data in decimal format, see equation 5-1 . the temperature bits are in two?s compliment format, therefore, positive temper ature data and negative temperature data are computed differently. equation 5- 1 shows the temperature computation. the example instruction code outlined in figure 5-5 shows the communication flow, also see figure 5-6 for timing diagram. equation 5-1: bytes to temperature conversion figure 5-5: example instruction code. where: t a = ambient temperature (c) upperbyte = t a bit 15 to bit 8 lowerbyte = t a bit 7 to bit 0 temperature 0c temperature < 0c t a upperbyte 2 4 lowerbyte 2 4 ? + () = t a 256 upperbyte 2 4 lowerbyte 2 4 ? + () ? = i2c_start(); // send start command i2c_write (addressbyte & 0xfe); //write command (see section 4.1.4 ) //also, make sure bit 0 is cleared ?0? i2c_write(0x05); // write t a register address i2c_start(); //repeat start i2c_write(addressbyte | 0x01); // read command (see section 4.1.4 ) //also, make sure bit 0 is set ?1? upperbyte = i2c_read(ack); // read 8 bits //and send ack bit lowerbyte = i2c_read(nak); // read 8 bits //and send nak bit i2c_stop(); // send stop command //convert the temperature data //first check flag bits if ((upperbyte & 0x80) == 0x80){ //t a t crit } if ((upperbyte & 0x40) == 0x40){ //t a > t upper } if ((upperbyte & 0x20) == 0x20){ //t a < t lower } upperbyte = upperbyte & 0x1f; //clear flag bits if ((upperbyte & 0x10) == 0x10){ //t a < 0c upperbyte = upperbyte & 0x0f; //clear sign temperature = 256 - (upperbyte x 16 + lowerbyte / 16); }else //t a 0c temperature = (upperbyte x 16 + lowerbyte / 16); // temperature = ambient temperature (c) this example routine assumes the variables and i2c communication subroutines are predefined: (see appendix a: ?source code? )
MCP9804 ds22203a-page 26 ? 2009 microchip technology inc. figure 5-6: timing diagram for reading +25.25c temperature from the t a register (see section 4.0 ). sda a c k 0011 a t a pointer 0000 a c k s 2 a 1 a 0 12345678 12345678 scl 0 address byte a c k 0011 a msb data a c k n a k s p 2 a 1 a 0 12345678 12345678 12345678 address byte lsb data r MCP9804 MCP9804 MCP9804 master master w sda scl 101 00000 001 10010 100 note: it is not necessary to select the register pointer if it was set from the previous read/write.
? 2009 microchip technology inc. ds22203a-page 27 MCP9804 5.1.4 manufacturer id register this register is used to iden tify the manufacturer of the device in order to perform manufacturer specific operation. the manufacturer id for the MCP9804 is 0x0054 (hexadecimal). figure 5-7: timing diagram for reading the manufacturer id register (see section 4.0 ). register 5-5: manufacturer id register (read-only) address ?0000 0110?b r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 manufacturer id bit 15 bit 8 r-0 r-1 r-0 r-1 r-0 r-1 r-0 r-0 manufacturer id bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-0 device manufacturer identification bits . sda a c k 0011 a manuf. id pointer 0000 a c k s 2 a 1 a 0 12345678 12345678 scl 0 address byte a c k 0011 a msb data a c k n a k s p 2 a 1 a 0 12345678 12345678 12345678 address byte lsb data r MCP9804 MCP9804 MCP9804 master master w sda scl 110 00000 000 01010 100 note: it is not necessary to select the register pointer if it was set from the previous read/write.
MCP9804 ds22203a-page 28 ? 2009 microchip technology inc. 5.1.5 device id and revision register the upper byte of this register is used to specify the device identification and the lower byte is used to specify device revision. the device id for the MCP9804 is 0x02 (hex). the revision begins with 0x00 (hex) for the first release, with the number being incremented as revised versions are released. figure 5-8: timing diagram for reading device id and de vice revision register (see section 4.0 ). register 5-6: device id and device revision (read-only) address ?0000 0111?b r-0 r-0 r-0 r-0 r-0 r-0 r-1 r-0 device id bit 15 bit 8 r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 device revision bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 15-8 device id: bit 15 to bit 8 are used for device id bit 7-0 device revision: bit 7 to bit 0 are used for device revision sda a c k 0011 a device id pointer 0000 a c k s 2 a 1 a 0 12345678 12345678 scl 0 address byte a c k 0011 a msb data a c k n a k s p 2 a 1 a 0 12345678 12345678 12345678 address byte lsb data r MCP9804 MCP9804 MCP9804 master master w sda scl 111 00100 001 00000 000 note: it is not necessary to select the register pointer if it was set from the previous read/write.
? 2009 microchip technology inc. ds22203a-page 29 MCP9804 5.1.6 resolution register this register allows the user to change the sensor resolution (see section 5.2.4 ). the por default resolution is 0.25c. the selected resolution is also reflected in the capability register (see register 5-2 ). figure 5-9: timing diagram for changing t a resolution to 0.0625c <0000 0011>b (see section 4.0 ). register 5-7: resolution address ?0000 1000?b u-0 u-0 u-0 u-0 u-0 u-0 r/w-1 r/w-1 ? ? ? ? ? ? resolution bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 7-3 unimplemented: read as ? 0 ? bit 2-0 resolution: 00 = lsb = 0.5c (t conv = 30 ms typical) 01 = lsb = 0.25c (t conv = 65 ms typical) 10 = lsb = 0.125c (t conv = 130 ms typical) 11 = lsb = 0.0625c (power up default, t conv = 250 ms typical) sda a c k 0011 a a c k s 2 a 1 a 0 12345678 12345678 scl address byte w MCP9804 MCP9804 a c k p 12345678 data resolution pointer MCP9804 00001 000 00000 011
MCP9804 ds22203a-page 30 ? 2009 microchip technology inc. 5.2 sensor feature description 5.2.1 shutdown mode shutdown mode disables all power-consuming activities (including temperature sampling operations) while leaving the serial interface active. this mode is selected by setting bit 8 of config to ? 1 ?. in this mode, the device consumes i shdn . it remains in this mode until bit 8 is cleared ? 0 ? to enable continuous conversion mode, or until power is recycled. the shutdown bit (bit 8) cannot be set to ? 1 ? while bits 6 and 7 of config (lock bits) are set to ? 1 ?. however, it can be cleared ? 0 ? or returned to continuous conversion while locked. in shutdown mode, all registers can be read or written. however, the serial bus activity increases the shutdown current. in addition, if the device is in shutdown while the alert pin is asserted, the device will retain the active state during shutdown. this increases the shutdown current due to the additional alert output current. 5.2.2 temperature hysteresis (t hyst ) a hysteresis of 0c, 1.5c, 3c or 6c can be selected for the t upper , t lower and t crit temperate boundaries using bits 10 and 9 of config. the hysteresis applies for decr easing temperature only (hot to cold), or as temperatur e drifts below the specified limit. the hysteresis bits can not be changed if either of the lock bits, bits 6 and 7 of config, are set to ? 1 ?. the t upper , t lower and t crit boundary conditions are described graphically in figure 5-11 . 5.2.3 alert output configuration the alert output can be enabled using bit 3 of config (alert output control bit) and can be configured as either a comparator output or as interrupt output mode using bit 0 of config (alert mode). the polarity can also be specified as an active-high or active-low using bit 1 of config (alert polarity). this is an open drain output and requires a pull-up resistor. when the ambient temper ature increases above the critical temperature limit, the alert output is forced to a comparator output (regardle ss of bit 0 of config). when the temperature drifts below the critical temperature limit minus hy steresis, the alert output automatically returns to the state specified by bit 0 of config. figure 5-10: active-low alert output configuration. the status of the alert output can be read using bit 4 of config (alert status). this bit can not be set to ? 1 ? in shutdown mode. bit 7 and 6 of the config register can be used to lock the t upper , t lower and t crit registers. the bits prevent false triggers at the alert output due to an accidental rewrite to these registers. the alert output can also be used as a critical temperature output using bi t 2 of config (critical output only). when this feature is selected, the alert output becomes a comparator output. in this mode, the interrupt output configuration (bit 0 of config) is ignored. 5.2.3.1 comparator mode comparator mode is selected using bit 0 of config. in this mode, the alert output is asserted as active-high or active-low using bit 1 of config. figure 5-11 shows the conditions that to ggle the alert output. if the device enters shutdown mode with asserted alert output, the output remains asserted during shutdown. the device must be operating in continuous conversion mode for t conv ; the t a vs. t upper , t lower and t crit boundary conditions need to be satisfied in order for the alert output to deassert. comparator mode is usef ul for thermostat-type applications, such as turning on a cooling fan or triggering a system shutdown when the temperature exceeds a safe operating range. 5.2.3.2 interrupt mode in the interrupt mode, the alert output is asserted as active-high or active-low (depending on the polarity configuration) when t a drifts above or below t upper and t lower limits. the output is deasserted by setting bit 5 (interrupt clear) of config. shutting down the device will not reset or deassert the alert output. this mode can not be selected when the alert output is used as critical temperature output only, using bit 2 of config. this mode is designed for interrupt driven microcontroller based systems. the microcontroller receiving the interrupt will have to acknowledge the interrupt by setting bit 5 of config regist er from the MCP9804. MCP9804 alert output r pu v dd
? 2009 microchip technology inc. ds22203a-page 31 MCP9804 5.2.4 temperature resolution the MCP9804 is capable of providing a temperature data with 0.5c to 0.0625c resolution. the resolution can be selected using the resolution register ( register 5-7 ) which is located in address ? 00001000 ?b. it provides measurement flexibility. a 0.0625c resolution is set as por default by factory. table 5-2: temperature conversion time resolution t conv (ms) samples/sec (typical) 0.5c 30 33 0.25c 65 15 0.125c 130 7 0.0625c (power-up default) 250 4
MCP9804 ds22203a-page 32 ? 2009 microchip technology inc. figure 5-11: alert output condition. t upper t lower alert output t crit t a t upper - t hyst (active-low) comparator interrupt s/w int. clear critical only t crit - t hyst 1 2 3 4 5 6 table 5-3: alert output conditions note alert output boundary conditions alert output t a bits comparator interrupt critical 15 14 13 1t a t lower h l h 000 2t a < t lower - t hyst l l h 001 3t a > t upper l l h 010 4 t a t upper - t hyst h l h 000 5 t a t crit l l l 110 6t a < t crit - t hyst l h h 010 * when t a t crit and t a < t crit - t hyst the alert output is comparator mode and bits 0 of config (alert output mode) is ignored. also, in in terrupt mode, if interrupt clear bit is not set then when temperature drops below the critical limit (note 6), th e alert output remains asserted. t lower -t hyst t lower -t hyst t upper - t hyst 1 3 4 2 note: *
? 2009 microchip technology inc. ds22203a-page 33 MCP9804 5.3 summary of power-on default the MCP9804 has an internal power-on reset (por) circuit. if the power supply voltage v dd glitches below the v por threshold, the device resets the registers to the power-on default settings. table 5-4 shows the power-on default summary for the temperature sensor registers. table 5-4: power-on reset defaults registers default register data (hexadecimal) power-up default register description address (hexadecimal) register name 0x01 config 0x0000 comparator mode active-low output alert and critical output output disabled alert not asserted interrupt cleared alert limits unlocked critical limit unlocked continuous conversion 0c hysteresis 0x02 t upper 0x0000 0c 0x03 t lower 0x0000 0c 0x04 t crit 0x0000 0c 0x05 t a 0x0000 0c 0x06 manufacturer id 0x0054 0x0054 (hex) 0x07 device id/ device revision 0x0200 0x0200 (hex) 0x08 resolution 0x03 0x03 (hex)
MCP9804 ds22203a-page 34 ? 2009 microchip technology inc. notes:
? 2009 microchip technology inc. ds22203a-page 35 MCP9804 6.0 applications information 6.1 layout considerations the MCP9804 does not require any additional components besides the master controller in order to measure temperature. however, it is recommended that a decoupling capacitor of 0.1 f to 1 f be used between the v dd and gnd pins. a high-frequency ceramic capacitor is recomm ended. it is necessary for the capacitor to be located as close as possible to the power and ground pins of the device in order to provide effective noise protection. in addition, good pcb layout is key for better thermal conduction from the pcb te mperature to the sensor die. for good temperature sensitivity, add a ground layer under the device pins as shown in figure 6-1 . 6.2 thermal considerations a potential for self-heating errors can exist if the MCP9804 sda, scl and event lines are heavily loaded with pull-ups (high current). typically, the self-heating error is negligible because of the relatively small current consumption of the MCP9804. a temperature accuracy error of approximately 0.5c could result from self-heatin g if the communication pins sink/source the maximum current specified. for example, if the event out put is loaded to maximum i ol , equation 6-1 can be used to determine the effect of self-heating. equation 6-1: effect of self-heating at room temperature (t a = +25c) with maximum i dd = 500 a and v dd = 3.6v, the self-heating due to power dissipation t is 0.2c for the dfn-8 package and 0.5c for the tssop-8 package. figure 6-1: dfn package layout (top view). t ja v dd i dd v ol_alert i ol_alert v ol_sda i ol_sda ? + ? + ? () = where: t =t j - t a t j = junction temperature t a = ambient temperature ja = package thermal resistance v ol_alert, sda = alert and sda output v ol (0.4 v max ) i ol_alert, sda = alert and sda output i ol (3 ma max ) sda scl alert gnd v dd a0 a1 a2 ep9
MCP9804 ds22203a-page 36 ? 2009 microchip technology inc. notes:
? 2009 microchip technology inc. ds22203a-page 37 MCP9804 7.0 packaging information 7.1 package marking information 8-lead msop example : xxxxxx ywwnnn 9804e 933256 legend: xx...x customer-specific information y year code (last digit of calendar year) yy year code (last 2 digits of calendar year) ww week code (week of january 1 is week ?01?) nnn alphanumeric traceability code pb-free jedec designator for matte tin (sn) * this package is pb-free. the pb-free jedec designator ( ) can be found on the outer packaging for this package. note : in the event the full microchip part nu mber cannot be marked on one line, it will be carried over to the next line, thus limiting the number of available characters for customer-specific information. 3 e 3 e 8-lead dfn (2 x 3) example: xxx yww nn aet 933 25
MCP9804 ds22203a-page 38 ? 2009 microchip technology inc. 
 

   !""#$%&   '   ! " #$ %! &  '(!%&! %(  % ")%%  % "     * &    &  #
 "% (   % "  +  *   )  ! % "  &    "%   
,-. /01 / &    %  # % !  ))%!%%    ,21  $   &  '! ! )%!%%   '$$& %
!
   ' 2% & %! %
* " ) '
  % 
 *  
$ % % " % %%
133)))&
&3
*  4% 55,, &  5&% 6 67 8 6!&( $ 6 9 % ./0 7  :  %  9   % "$$    . 0% %* + ,2 7  5  %  /0 7  ;"% , +/0 ,#
 " "5  %  + < .. ,#
 " ";"% , . < . 0% %;"% (  . + 0% %5  % 5 +  . 0% % % ,#
 " " =  < < d n e note 1 1 2 exposed pad note 1 2 1 d2 k l e2 n e b a3 a1 a note 2 bottom view top view 
    ) 0 +0
? 2009 microchip technology inc. ds22203a-page 39 MCP9804 
 

   !""#$%&  ' 2% & %! %
* " ) '
  % 
 *  
$ % % " % %%
133)))&
&3
* 
MCP9804 ds22203a-page 40 ? 2009 microchip technology inc. 
  ()"
*
+ )%)* &   '   ! " #$ %! &  '(!%&! %(  % ")%%  % "    &    ","%!" &"$ 
%!  "$ 
%!    % # ".&&
 "  + &    "%   
,-. /01 / &    %  # % !  ))%!%%    ,21  $   &  '! ! )%!%%   '$$& %
!
   ' 2% & %! %
* " ) '
  % 
 *  
$ % % " % %%
133)))&
&3
*  4% 55,, &  5&% 6 67 8 6!&( $ 6 9 % >./0 7  :  %  < <  " " * *  . 9. . % "$$   < . 7  ;"% , /0 " " * ;"% , +/0 7  5  %  +/0 2%5  % 5  > 9 2%
% 5 .,2 2%   ? < 9? 5 "*  9 < + 5 ";"% (  <  d n e e1 note 1 1 2 e b a a1 a2 c l1 l 
    ) 0 /
? 2009 microchip technology inc. ds22203a-page 41 MCP9804 note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging
MCP9804 ds22203a-page 42 ? 2009 microchip technology inc. notes:
? 2009 microchip technology inc. ds22203a-page 43 MCP9804 software license agreement the software supplied herewith by microc hip technology incorporated (the ?company ?) is intended and supplied to you, the company?s customer, for use solely and exclusiv ely with products manufactured by the company. the software is owned by the company and/or its supplier, and is protected under applicable copy right laws. all rights are rese rved. any use in violation of the foregoing restrictions may subject the user to criminal sanctions under applicable laws, as well as to civil liability for the breach of the te rms and conditions of this license. this software is provided in an ?as is? condition. no warranties, whether express, implied or statu- tory, including, but not limited to, implied warrant ies of merchantability and fitness for a particu- lar purpose apply to this softwa re. the company shall not, in any circumstances, be liable for special, incidental or consequential damages, for any reason whatsoever. appendix a: source code /******************************************************************** filename: i2c.h dependencies: i2c.c processor:pic18 microcontrollers complier: microchip c18 (for pic18) or c30 (for pic24) company:microchip technology, inc. software license agreement: the software supplied herewith by microchip technology incorporated (the ?company?) for its pic? microcontroller is intended and supplied to you, the company?s customer, for use solely and exclusively on microchip pic microcontroller products. the software is owned by the company and/or its supplier, and is protected under applicable copyright laws. all rights are reserved. any use in violation of the foregoing restrictions may subject the user to criminal sanctions under applicable laws, as well as to civil liability for the breach of the terms and conditions of this license. this software is provided in an ?as is? condition. no warranties, whether express, implied or statutory, including, but not limited to, implied warranties of merchantability and fitness for a particular purpose apply to this software. the company shall not, in any circumstances, be liable for special, incidental or consequential damages, for any reason whatsoever. **************************************************************/ #define ack 1 #define nack 0 #define slave_7 6 /* i2c slave mode, 7-bit address */ #define slave_10 7 /* i2c slave mode, 10-bit address */ #define master 8 /* i2c master mode */ /* sspstat register */ #define slew_off 0xc0 /* slew rate disabled for 100khz mode */ #define slew_on 0x00 /* slew rate enabled for 400khz mode */ extern void openi2c(unsigned char sync_mode, unsigned char slew); extern void i2cstart(void); extern void i2crestart(void); extern void i2cstop(void); extern unsigned char writei2c(unsigned char data_out); extern unsigned char readi2c(unsigned char ack); extern void acki2c(void); extern void nack(void); extern void waitforack(void); extern unsigned char i2cdataready(void);
MCP9804 ds22203a-page 44 ? 2009 microchip technology inc. /******************************************************************** filename: i2c.c dependencies: i2c.h processor:pic18 microcontrollers complier: microchip c18 (for pic18) or c30 (for pic24) company:microchip technology, inc. software license agreement: the software supplied herewith by microchip technology incorporated (the ?company?) for its pic? microcontroller is intended and supplied to you, the company?s customer, for use solely and exclusively on microchip pic microcontroller products. the software is owned by the company and/or its supplier, and is protected under applicable copyright laws. all rights are reserved. any use in violation of the foregoing restrictions may subject the user to criminal sanctions under applicable laws, as well as to civil liability for the breach of the terms and conditions of this license. this software is provided in an ?as is? condition. no warranties, whether express, implied or statutory, including, but not limited to, implied warranties of merchantability and fitness for a particular purpose apply to this software. the company shall not, in any circumstances, be liable for special, incidental or consequential damages, for any reason whatsoever. **************************************************************/ #include"p18f2550.h" // this code is developed for pic18f2550 //it can be modified to be used with any picmicro with mssp module #include "i2c.h" /******************************************************************** * function name: openi2c1 * * return value: void * * parameters: ssp1 peripheral setup bytes * * description: this function sets up the ssp1 module on a * * pic18cxxx device for use with a microchip i2c * * eeprom device or i2c bus device. * ********************************************************************/ void openi2c(unsigned char sync_mode, unsigned char slew) { sspstat &= 0x3f; // power on state sspcon1 = 0x00; // power on state sspcon2 = 0x00; // power on state sspcon1 |= sync_mode; // select serial mode sspstat |= slew; // slew rate on/off sspcon1bits.sspen = 1; // enable synchronous serial port } /******************************************************************** * function name: i2cstart * return value: void * parameters: void * description: * ********************************************************************/ void i2cstart(void) { pir1bits.sspif = 0;//clear interrupt sspcon2bits.sen=1; while(!pir1bits.sspif);//wait for data received interrupt pir1bits.sspif = 0;//clear interrupt }
? 2009 microchip technology inc. ds22203a-page 45 MCP9804 /******************************************************************** * function name: i2crestart * return value: void * parameters: void * description: * ********************************************************************/ void i2crestart(void) { pir1bits.sspif = 0;//clear interrupt sspcon2bits.rsen = 1; while(!pir1bits.sspif);//wait for data received interrupt pir1bits.sspif = 0;//clear interrupt } /******************************************************************** * function name: i2cstop * return value: void * parameters: void * description: stop bit * ********************************************************************/ void i2cstop(void) { pir1bits.sspif = 0;//clear interrupt if (!sspstatbits.p) { sspcon2bits.pen = 1; //stop condition while(sspcon2bits.pen); //wait for stop if (pir2bits.bclif) pir2bits.bclif = 0; while(!pir1bits.sspif); //wait for flag to set pir1bits.sspif = 0; } } /******************************************************************** * function name: writei2c2 * * return value: status byte for wcol detection. * * parameters: single data byte for i2c2 bus. * * description: this routine writes a single byte to the * * i2c2 bus. * ********************************************************************/ unsigned char writei2c( unsigned char data_out ) { sspbuf = data_out; // write single byte to ssp2buf if ( sspcon1bits.wcol ) // test if write collision occurred return ( -1 ); // if wcol bit is set return negative # else { while( sspstatbits.bf ); // wait until write cycle is complete waitforack();//wait for ack from device return ( 0 ); // if wcol bit is not set return non-negative # } }
MCP9804 ds22203a-page 46 ? 2009 microchip technology inc. /******************************************************************** * function name: readi2c2 * * return value: contents of ssp2buf register * * parameters: ack = 1 and nak = 0 * * description: read a byte from i2c bus and ack/nak * ********************************************************************/ unsigned char readi2c(unsigned char ack) { while (sspstatbits.bf); sspcon2bits.rcen = 1; // enable master for 1 byte reception while (!sspstatbits.bf); // wait until byte received if ack // acki2c(); // give ack else nack(); return (sspbuf); // return with read byte } /******************************************************************** * function name: acki2c * * return value: void * * parameters: void * * description: initiate ack bus condition. * ********************************************************************/ void acki2c(void) { pir1bits.sspif = 0; sspcon2bits.ackdt = 0; // set acknowledge bit state for ack sspcon2bits.acken = 1; // initiate bus acknowledge sequence while(!pir1bits.sspif); pir1bits.sspif = 0; } /******************************************************************** * function name: nacki2c * * return value: void * * parameters: void * * description: initiate no-ack bus condition. * ********************************************************************/ void nack(void) { pir1bits.sspif = 0; sspcon2bits.ackdt = nack; //disable ack sspcon2bits.acken = 1; //start ack sequence while(!pir1bits.sspif); //wait for flag to set pir1bits.sspif = 0; } /******************************************************************** * function name: waitforack * return value: void * parameters: void * description: * ********************************************************************/ void waitforack(void) { pir1bits.sspif = 0; //clear interrupt while(!pir1bits.sspif); //wait for data received interrupt pir1bits.sspif = 0;//clear interrupt }
? 2009 microchip technology inc. ds22203a-page 47 MCP9804 /******************************************************************** * function name: i2cdataready * * return value: buffer full (bf) flag * * parameters: void * * description: checks if data is in the sspbuf * ********************************************************************/ unsigned char i2cdataready(void) { if (sspstatbits.bf) // test if buffer full bit is set return ( +1 ); // data in ssp2buf register else return ( 0 ); // no data in ssp2buf register }
MCP9804 ds22203a-page 48 ? 2009 microchip technology inc. notes:
? 2009 microchip technology inc. ds22203a-page 49 MCP9804 appendix b: revision history revision a (september 2009) ? original release of this document.
MCP9804 ds22203a-page 50 ? 2009 microchip technology inc. notes:
? 2009 microchip technology inc. ds22203a-page 51 MCP9804 product identification system to order or obtain information, e.g., on pricing or de livery, refer to the factory or the listed sales office . device: MCP9804: digital temperature sensor MCP9804t: digital temperature sensor (tape and reel) temperature range: e = -40 c to +125 c package: mc = plastic dual flat no-lead (dfn) 2x3, 8-lead ms = plastic micro small outline (msop), 8-lead part no. - x /xx package temperature range device examples: a) MCP9804-e/mc: extended temperature 8ld dfn package. b) MCP9804-e/ms: extended temperature 8ld msop package. c) MCP9804t-e/mc: tape and reel, extended temperature 8ld dfn package. d) MCP9804t-e/ms:: tape and reel, extended temperature 8ld msop package. x tape and reel alternate pinout and/or
MCP9804 ds22203a-page 52 ? 2009 microchip technology inc. notes:
? 2009 microchip technology inc. ds22203a-page 53 information contained in this publication regarding device applications and the like is prov ided only for your convenience and may be superseded by updates. it is your responsibility to ensure that your application me ets with your specifications. microchip makes no representations or warranties of any kind whether express or implied, written or oral, statutory or otherwise, related to the information, including but not limited to its condition, quality, performance, merchantability or fitness for purpose . microchip disclaims all liability arising from this information and its use. use of microchip devices in life support and/or safe ty applications is entirely at the buyer?s risk, and the buyer agrees to defend, indemnify and hold harmless microchip from any and all damages, claims, suits, or expenses resulting fr om such use. no licenses are conveyed, implicitly or ot herwise, under any microchip intellectual property rights. trademarks the microchip name and logo, th e microchip logo, dspic, k ee l oq , k ee l oq logo, mplab, pic, picmicro, picstart, rfpic and uni/o are registered trademarks of microchip technology incorporated in the u.s.a. and other countries. filterlab, hampshire, hi-tech c, linear active thermistor, mxdev, mxlab, seeval and the embedded control solutions company are register ed trademarks of microchip technology incorporated in the u.s.a. analog-for-the-digital age, a pplication maestro, codeguard, dspicdem, dspicdem.net, dspicworks, dsspeak, ecan, economonitor, fansense, hi-tide, in-circuit serial programming, icsp, mindi, miwi, mpasm, mplab certified logo, mplib, mplink, mtouch, octopus, omniscient code generation, picc, picc-18, picdem, picdem.net, pickit, pictail, pic 32 logo, real ice, rflab, select mode, total endurance, tsharc, uniwindr iver, wiperlock and zena are trademarks of microchip te chnology incorporated in the u.s.a. and other countries. sqtp is a service mark of mi crochip technology incorporated in the u.s.a. all other trademarks mentioned herein are property of their respective companies. ? 2009, microchip technology incorporated, printed in the u.s.a., all rights reserved. printed on recycled paper. note the following details of the code protection feature on microchip devices: ? microchip products meet the specification cont ained in their particular microchip data sheet. ? microchip believes that its family of products is one of the mo st secure families of its kind on the market today, when used i n the intended manner and under normal conditions. ? there are dishonest and possibly illegal meth ods used to breach the code protection fe ature. all of these methods, to our knowledge, require using the microchip pr oducts in a manner outside the operating specif ications contained in microchip?s data sheets. most likely, the person doing so is engaged in theft of intellectual property. ? microchip is willing to work with the customer who is concerned about the integrity of their code. ? neither microchip nor any other semiconduc tor manufacturer can guarantee the security of their code. code protection does not mean that we are guaranteeing the product as ?unbreakable.? code protection is constantly evolving. we at microchip are committed to continuously improving the code protection features of our products. attempts to break microchip?s c ode protection feature may be a violation of the digital millennium copyright act. if such acts allow unauthorized access to your softwa re or other copyrighted work, you may have a right to sue for relief under that act. microchip received iso/ts-16949:2002 certification for its worldwide headquarters, design and wafer fabrication facilities in chandler and tempe, arizona; gresham, oregon and design centers in california and india. the company?s quality system processes and procedures are for its pic ? mcus and dspic ? dscs, k ee l oq ? code hopping devices, serial eeproms, microperi pherals, nonvolatile memory and analog products. in addition, microchip?s quality system for the design and manufacture of development systems is iso 9001:2000 certified.
ds22203a-page 54 ? 2009 microchip technology inc. americas corporate office 2355 west chandler blvd. chandler, az 85224-6199 tel: 480-792-7200 fax: 480-792-7277 technical support: http://support.microchip.com web address: www.microchip.com atlanta duluth, ga tel: 678-957-9614 fax: 678-957-1455 boston westborough, ma tel: 774-760-0087 fax: 774-760-0088 chicago itasca, il tel: 630-285-0071 fax: 630-285-0075 cleveland independence, oh tel: 216-447-0464 fax: 216-447-0643 dallas addison, tx tel: 972-818-7423 fax: 972-818-2924 detroit farmington hills, mi tel: 248-538-2250 fax: 248-538-2260 kokomo kokomo, in tel: 765-864-8360 fax: 765-864-8387 los angeles mission viejo, ca tel: 949-462-9523 fax: 949-462-9608 santa clara santa clara, ca tel: 408-961-6444 fax: 408-961-6445 toronto mississauga, ontario, canada tel: 905-673-0699 fax: 905-673-6509 asia/pacific asia pacific office suites 3707-14, 37th floor tower 6, the gateway harbour city, kowloon hong kong tel: 852-2401-1200 fax: 852-2401-3431 australia - sydney tel: 61-2-9868-6733 fax: 61-2-9868-6755 china - beijing tel: 86-10-8528-2100 fax: 86-10-8528-2104 china - chengdu tel: 86-28-8665-5511 fax: 86-28-8665-7889 china - hong kong sar tel: 852-2401-1200 fax: 852-2401-3431 china - nanjing tel: 86-25-8473-2460 fax: 86-25-8473-2470 china - qingdao tel: 86-532-8502-7355 fax: 86-532-8502-7205 china - shanghai tel: 86-21-5407-5533 fax: 86-21-5407-5066 china - shenyang tel: 86-24-2334-2829 fax: 86-24-2334-2393 china - shenzhen tel: 86-755-8203-2660 fax: 86-755-8203-1760 china - wuhan tel: 86-27-5980-5300 fax: 86-27-5980-5118 china - xiamen tel: 86-592-2388138 fax: 86-592-2388130 china - xian tel: 86-29-8833-7252 fax: 86-29-8833-7256 china - zhuhai tel: 86-756-3210040 fax: 86-756-3210049 asia/pacific india - bangalore tel: 91-80-3090-4444 fax: 91-80-3090-4080 india - new delhi tel: 91-11-4160-8631 fax: 91-11-4160-8632 india - pune tel: 91-20-2566-1512 fax: 91-20-2566-1513 japan - yokohama tel: 81-45-471- 6166 fax: 81-45-471-6122 korea - daegu tel: 82-53-744-4301 fax: 82-53-744-4302 korea - seoul tel: 82-2-554-7200 fax: 82-2-558-5932 or 82-2-558-5934 malaysia - kuala lumpur tel: 60-3-6201-9857 fax: 60-3-6201-9859 malaysia - penang tel: 60-4-227-8870 fax: 60-4-227-4068 philippines - manila tel: 63-2-634-9065 fax: 63-2-634-9069 singapore tel: 65-6334-8870 fax: 65-6334-8850 taiwan - hsin chu tel: 886-3-6578-300 fax: 886-3-6578-370 taiwan - kaohsiung tel: 886-7-536-4818 fax: 886-7-536-4803 taiwan - taipei tel: 886-2-2500-6610 fax: 886-2-2508-0102 thailand - bangkok tel: 66-2-694-1351 fax: 66-2-694-1350 europe austria - wels tel: 43-7242-2244-39 fax: 43-7242-2244-393 denmark - copenhagen tel: 45-4450-2828 fax: 45-4485-2829 france - paris tel: 33-1-69-53-63-20 fax: 33-1-69-30-90-79 germany - munich tel: 49-89-627-144-0 fax: 49-89-627-144-44 italy - milan tel: 39-0331-742611 fax: 39-0331-466781 netherlands - drunen tel: 31-416-690399 fax: 31-416-690340 spain - madrid tel: 34-91-708-08-90 fax: 34-91-708-08-91 uk - wokingham tel: 44-118-921-5869 fax: 44-118-921-5820 w orldwide s ales and s ervice 03/26/09


▲Up To Search▲   

 
Price & Availability of MCP9804

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X